<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let i = 1;
        while (i <= 5) {
            if (i === 3) {
                break; // 结束整个循环
            }
            document.write(`这是第 ${i} 次循环<br>`);
            i++;
        }

        i = 1;
        while (i <= 5) {
            if (i === 3) {
                i++;
                continue; // 跳过本次循环，继续下一次循环
            }
            document.write(`这是第 ${i} 次循环<br>`);
            i++;
        }
    </script>
</body>

</html>